//
//  UIButton+Extension.m
//  OC新浪微博
//
//  Created by wyman on 16/4/16.
//  Copyright © 2016年 wyman. All rights reserved.
//

#import "UIButton+Extension.h"

@implementation UIButton (Extension)


-(instancetype)initWithimage:(NSString *)imageName withTitle:(NSString *)title
{
    if (self = [super initWithFrame:CGRectZero]) {
       
        [self setBackgroundImage:[UIImage imageNamed:@"timeline_card_bottom_background"] forState:UIControlStateNormal];
        [self setBackgroundImage:[UIImage imageNamed:@"timeline_card_bottom_background_highlighted"] forState:UIControlStateHighlighted];
        [self setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
        
        [self setTitle:title forState:UIControlStateNormal];
        
        [self setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
        
        self.titleLabel.font = [UIFont systemFontOfSize:12];
        
        
    }
    return self;
}


@end
